import request from '@/utils/request'
import _URL from '@/store/url'

// 查询字典类型列表
export function dictList(query) {
  return request({
    url: _URL.DICT_PAGE,
    method: 'post',
    params: query
  })
}

// 查询字典详情
export function dictDetail(id) {
  return request({
    url: _URL.DICT_DETAIL,
    method: 'post',
    params: { "id":id }
  })
}

export function submit(data) {
  return request({
    url: _URL.DICT_SUBMIT,
    headers: {
      'Content-Type': 'application/json'
    },
    method: 'post',
    data: data
  })
}

// 获取自定字典值
export function getDict(options) {
  return request({
    url: _URL.DICT_GET_DICT,
    method: 'post',
    params: {
      'dictCode': options
    }
  })
}

// 获取系统目前的字典类型
export function getParentDict() {
  return request({
    url: _URL.DICT_GET_PARENT_DICT,
    method: 'post'
  })
}


